import com.spzx.common.core.constant.AIModelConstant;
import com.spzx.report.aiTools.SpzxAiQuest;
import com.spzx.report.service.SpzxEmbeddingService;
import dev.langchain4j.model.openai.OpenAiChatModel;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author dxt
 * @create 2025-06-09-17:00
 */
public class test {

    @Autowired
    SpzxEmbeddingService spzxEmbeddingService;
    @Test
    public void test(){
        OpenAiChatModel model = OpenAiChatModel.builder()
                .apiKey(AIModelConstant.AI_API_KEY)
                .baseUrl(AIModelConstant.AI_MODEL_URL)
                .modelName(AIModelConstant.AI_MODEL_NAME)
                .build();
        String answer = model.chat("你是谁");
        System.out.println(answer); // Hello World
    }

    @Test
    public void test1(){
        System.out.println(new SpzxAiQuest().processQuestion("小米品牌手机在各个城市的销售情况是怎样"));

    }

    @Test
    public void test2(){
        new SpzxAiQuest().processChat("你是谁");
    }

    @Test
    public void a() {
        spzxEmbeddingService.embeddingGroupKeyToPinecone();
        spzxEmbeddingService.embeddingGroupKeyToPinecone();
        spzxEmbeddingService.embeddingCountKeyToPinecone();
    }


}
